Integrand size = 33, antiderivative size = 168 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {1}{2} a \left (6 A b^2+a^2 (A+2 C)\right ) x+\frac {b \left (2 A b^2+\left (6 a^2+b^2\right ) C\right ) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {3 A b (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{2 d}-\frac {3 a b^2 (3 A-2 C) \tan (c+d x)}{2 d}-\frac {b^3 (4 A-C) \sec (c+d x) \tan (c+d x)}{2 d} \]
[Out]
Time = 0.48 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {4180, 4179, 4133, 3855, 3852, 8} \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {b \left (C \left (6 a^2+b^2\right )+2 A b^2\right ) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {1}{2} a x \left (a^2 (A+2 C)+6 A b^2\right )-\frac {3 a b^2 (3 A-2 C) \tan (c+d x)}{2 d}+\frac {3 A b \sin (c+d x) (a+b \sec (c+d x))^2}{2 d}+\frac {A \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))^3}{2 d}-\frac {b^3 (4 A-C) \tan (c+d x) \sec (c+d x)}{2 d} \]
[In]
[Out]
Rule 8
Rule 3852
Rule 3855
Rule 4133
Rule 4179
Rule 4180
Rubi steps \begin{align*} \text {integral}& = \frac {A \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{2 d}+\frac {1}{2} \int \cos (c+d x) (a+b \sec (c+d x))^2 \left (3 A b+a (A+2 C) \sec (c+d x)-2 b (A-C) \sec ^2(c+d x)\right ) \, dx \\ & = \frac {3 A b (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{2 d}+\frac {1}{2} \int (a+b \sec (c+d x)) \left (6 A b^2+a^2 (A+2 C)-a b (A-4 C) \sec (c+d x)-2 b^2 (4 A-C) \sec ^2(c+d x)\right ) \, dx \\ & = \frac {3 A b (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{2 d}-\frac {b^3 (4 A-C) \sec (c+d x) \tan (c+d x)}{2 d}+\frac {1}{4} \int \left (2 a \left (6 A b^2+a^2 (A+2 C)\right )+2 b \left (2 A b^2+\left (6 a^2+b^2\right ) C\right ) \sec (c+d x)-6 a b^2 (3 A-2 C) \sec ^2(c+d x)\right ) \, dx \\ & = \frac {1}{2} a \left (6 A b^2+a^2 (A+2 C)\right ) x+\frac {3 A b (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{2 d}-\frac {b^3 (4 A-C) \sec (c+d x) \tan (c+d x)}{2 d}-\frac {1}{2} \left (3 a b^2 (3 A-2 C)\right ) \int \sec ^2(c+d x) \, dx+\frac {1}{2} \left (b \left (2 A b^2+\left (6 a^2+b^2\right ) C\right )\right ) \int \sec (c+d x) \, dx \\ & = \frac {1}{2} a \left (6 A b^2+a^2 (A+2 C)\right ) x+\frac {b \left (2 A b^2+\left (6 a^2+b^2\right ) C\right ) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {3 A b (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{2 d}-\frac {b^3 (4 A-C) \sec (c+d x) \tan (c+d x)}{2 d}+\frac {\left (3 a b^2 (3 A-2 C)\right ) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{2 d} \\ & = \frac {1}{2} a \left (6 A b^2+a^2 (A+2 C)\right ) x+\frac {b \left (2 A b^2+\left (6 a^2+b^2\right ) C\right ) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {3 A b (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{2 d}-\frac {3 a b^2 (3 A-2 C) \tan (c+d x)}{2 d}-\frac {b^3 (4 A-C) \sec (c+d x) \tan (c+d x)}{2 d} \\ \end{align*}
Time = 3.48 (sec) , antiderivative size = 287, normalized size of antiderivative = 1.71 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {2 a \left (6 A b^2+a^2 (A+2 C)\right ) (c+d x)-2 b \left (2 A b^2+\left (6 a^2+b^2\right ) C\right ) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+2 b \left (2 A b^2+\left (6 a^2+b^2\right ) C\right ) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {b^3 C}{\left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {12 a b^2 C \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )}-\frac {b^3 C}{\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {12 a b^2 C \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )}+12 a^2 A b \sin (c+d x)+a^3 A \sin (2 (c+d x))}{4 d} \]
[In]
[Out]
Time = 0.72 (sec) , antiderivative size = 157, normalized size of antiderivative = 0.93
method | result | size |
derivativedivides | \(\frac {a^{3} A \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{3} C \left (d x +c \right )+3 A \,a^{2} b \sin \left (d x +c \right )+3 a^{2} b C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+3 a A \,b^{2} \left (d x +c \right )+3 C \tan \left (d x +c \right ) a \,b^{2}+A \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+C \,b^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(157\) |
default | \(\frac {a^{3} A \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{3} C \left (d x +c \right )+3 A \,a^{2} b \sin \left (d x +c \right )+3 a^{2} b C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+3 a A \,b^{2} \left (d x +c \right )+3 C \tan \left (d x +c \right ) a \,b^{2}+A \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+C \,b^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(157\) |
parallelrisch | \(\frac {-8 \left (1+\cos \left (2 d x +2 c \right )\right ) b \left (\left (A +\frac {C}{2}\right ) b^{2}+3 C \,a^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+8 \left (1+\cos \left (2 d x +2 c \right )\right ) b \left (\left (A +\frac {C}{2}\right ) b^{2}+3 C \,a^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+4 a x d \left (6 A \,b^{2}+a^{2} \left (A +2 C \right )\right ) \cos \left (2 d x +2 c \right )+\left (2 a^{3} A +24 C a \,b^{2}\right ) \sin \left (2 d x +2 c \right )+12 A \,a^{2} b \sin \left (3 d x +3 c \right )+a^{3} A \sin \left (4 d x +4 c \right )+\left (12 A \,a^{2} b +8 C \,b^{3}\right ) \sin \left (d x +c \right )+4 a x d \left (6 A \,b^{2}+a^{2} \left (A +2 C \right )\right )}{8 d \left (1+\cos \left (2 d x +2 c \right )\right )}\) | \(230\) |
risch | \(\frac {a^{3} A x}{2}+3 A a \,b^{2} x +a^{3} x C -\frac {i a^{3} A \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 d}-\frac {3 i A \,a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {3 i A \,a^{2} b \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {i a^{3} A \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}-\frac {i C \,b^{2} \left (b \,{\mathrm e}^{3 i \left (d x +c \right )}-6 a \,{\mathrm e}^{2 i \left (d x +c \right )}-b \,{\mathrm e}^{i \left (d x +c \right )}-6 a \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{d}+\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C \,a^{2}}{d}+\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{2 d}-\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{d}-\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C \,a^{2}}{d}-\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{2 d}\) | \(296\) |
norman | \(\frac {\left (\frac {1}{2} a^{3} A +3 a A \,b^{2}+a^{3} C \right ) x +\left (-\frac {1}{2} a^{3} A -3 a A \,b^{2}-a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (-\frac {1}{2} a^{3} A -3 a A \,b^{2}-a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (\frac {1}{2} a^{3} A +3 a A \,b^{2}+a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (-a^{3} A -6 a A \,b^{2}-2 a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (-a^{3} A -6 a A \,b^{2}-2 a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+\left (2 a^{3} A +12 a A \,b^{2}+4 a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {\left (a^{3} A +6 A \,a^{2} b +6 C a \,b^{2}+C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {\left (5 a^{3} A -18 A \,a^{2} b +6 C a \,b^{2}+C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}-\frac {\left (a^{3} A -6 A \,a^{2} b +6 C a \,b^{2}-C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{d}-\frac {2 \left (5 a^{3} A -6 A \,a^{2} b -6 C a \,b^{2}+C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}+\frac {2 \left (5 a^{3} A +6 A \,a^{2} b -6 C a \,b^{2}-C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {\left (5 a^{3} A +18 A \,a^{2} b +6 C a \,b^{2}-C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{4}}-\frac {b \left (2 A \,b^{2}+6 C \,a^{2}+C \,b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {b \left (2 A \,b^{2}+6 C \,a^{2}+C \,b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) | \(573\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.02 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \, {\left ({\left (A + 2 \, C\right )} a^{3} + 6 \, A a b^{2}\right )} d x \cos \left (d x + c\right )^{2} + {\left (6 \, C a^{2} b + {\left (2 \, A + C\right )} b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (6 \, C a^{2} b + {\left (2 \, A + C\right )} b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (A a^{3} \cos \left (d x + c\right )^{3} + 6 \, A a^{2} b \cos \left (d x + c\right )^{2} + 6 \, C a b^{2} \cos \left (d x + c\right ) + C b^{3}\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \]
[In]
[Out]
\[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\int \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{3} \cos ^{2}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.23 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.07 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{3} + 4 \, {\left (d x + c\right )} C a^{3} + 12 \, {\left (d x + c\right )} A a b^{2} - C b^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 6 \, C a^{2} b {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, A b^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 12 \, A a^{2} b \sin \left (d x + c\right ) + 12 \, C a b^{2} \tan \left (d x + c\right )}{4 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 387 vs. \(2 (156) = 312\).
Time = 0.36 (sec) , antiderivative size = 387, normalized size of antiderivative = 2.30 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left (A a^{3} + 2 \, C a^{3} + 6 \, A a b^{2}\right )} {\left (d x + c\right )} + {\left (6 \, C a^{2} b + 2 \, A b^{3} + C b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (6 \, C a^{2} b + 2 \, A b^{3} + C b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 6 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 6 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 3 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 1\right )}^{2}}}{2 \, d} \]
[In]
[Out]
Time = 17.10 (sec) , antiderivative size = 282, normalized size of antiderivative = 1.68 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {2\,\left (\frac {A\,a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2}+A\,b^3\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )+C\,a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )+\frac {C\,b^3\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2}+3\,A\,a\,b^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )+3\,C\,a^2\,b\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\right )}{d}+\frac {\frac {A\,a^3\,\sin \left (2\,c+2\,d\,x\right )}{8}+\frac {A\,a^3\,\sin \left (4\,c+4\,d\,x\right )}{16}+\frac {C\,b^3\,\sin \left (c+d\,x\right )}{2}+\frac {3\,A\,a^2\,b\,\sin \left (c+d\,x\right )}{4}+\frac {3\,A\,a^2\,b\,\sin \left (3\,c+3\,d\,x\right )}{4}+\frac {3\,C\,a\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{2}}{d\,\left (\frac {\cos \left (2\,c+2\,d\,x\right )}{2}+\frac {1}{2}\right )} \]
[In]
[Out]